On lock-free programming patterns
نویسنده
چکیده
Lock-free programming is a well-known technique for multithreaded programming. Lock-free programming is a way to share changing data among several threads without paying the cost of acquiring and releasing locks. On practice, parallel programming models must include scalable concurrent algorithms and patterns. Lock-free programming patterns play an important role in scalability. This paper is devoted to lockfree data structures and algorithms. Our task was to choose the data structures for the concurrent garbage collector. We aim to provide a survey of lock-free patterns and approaches, estimate the potential performance gain for lock-free solutions. By our opinion, the most challenging problem for concurrent programming is the coordination and data flow organizing, rather than relatively low-level data structures. So, as the most promising from the practical point of view lock-free programming pattern, we choose the framework based on the Software Transactional Memory. Key-Words: parallel programming, thread, lock, mutex, semaphore, scalability, atomic
منابع مشابه
Accelerating Code on Multi-cores with FastFlow
FastFlow is a programming framework specifically targeting cache-coherent shared-memory multicores. It is implemented as a stack of C++ template libraries built on top of lock-free (and memory fence free) synchronization mechanisms. Its philosophy is to combine programmability with performance. In this paper a new FastFlow programming methodology aimed at supporting parallelization of existing ...
متن کاملStatic Analysis of Atomicity for Programs with Lock-Free Synchronization∗
In concurrent programming, lock-free synchronization is veryefficient but difficult to design correctly. This paper presentsa static analysis to show that code blocks are atomic, i.e.,that every execution of the program is equivalent to onein which those code blocks execute without interruption byother threads. Our analysis determines commutativity ofoperations based pri...
متن کاملLock-Free Parallel Algorithms: An Experimental Study
Lock-free shared data structures in the setting of distributed computing have received a fair amount of attention. Major motivations of lock-free data structures include increasing fault tolerance of a (possibly heterogeneous) system and alleviating the problems associated with critical sections such as priority inversion and deadlock. For parallel computers with tightly-coupled processors and ...
متن کاملLock-Free Algorithms for Thread Safe Programming
An object is lock-free if it guarantees that in a system where multiple threads are manipulating the object, some thread will complete its operation on the object in a finite number of steps, no matter what happens to other threads. More practically, lock-free programming is a technique to achieve thread safety without the use of locks, which are the current standard. Lock-free objects (LFOs) h...
متن کاملDesigning irregular parallel algorithms with mutual exclusion and lock-free protocols
Irregular parallel algorithms pose a significant challenge for achieving high performance because of the difficulty predicting memory access patterns or execution paths. Within an irregular application, fine-grained synchronization is one technique for managing the coordination of work; but in practice the actual performance for irregular problems depends on the input, the access pattern to sha...
متن کامل